package com.sugon.modules.device.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 异常上报参数VO
 *
 * @author ： YuXD
 * @version: 1.0
 * @since 2023-01-12
 */
@Data
public class ExceptionUploadParam implements Serializable {

    /**
     * 取值来源：TodoSource
     */
    @NotNull(message = "异常来源必填！")
    private String source;

    @NotBlank(message = "来源记录ID必填！")
    private String originRecordId;

    @NotBlank(message = "问题描述必填")
    private String questionDesc;

    @NotBlank(message = "责任人必填！")
    private String dutyUserId;

    @NotBlank(message = "建议必填")
    private String measure;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "开始日期必填！")
    private Date startDate;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "结束日期必填")
    private Date endDate;

}
